package dungeonPackage;

import squareBorderPackage.Square;

/**
 * Class of squares involving maxCoordinates, squares and a motherDungeon.
 * 
 * @param 	<E>
 * 			The type of squares the dungeon can contain.
 * 
 * @version	1.0
 * @author 	Esther Alberts & Jessa Bekker
 */
public class Level<E extends Square> extends SingularDungeon<E> {

	/**
	 * Initialize a new Level with given max coordinates.
	 * 
	 * @effect	This new Level is initialized as a Dungeon with the given maxCoordinates.
	 * 			|super(maxCoordinates)
	 */
	public Level(Orientation maxCoordinates) {
		super(maxCoordinates);
	}
	
	/**
	 * Check whether the given orientation is a valid orientation for a level.
	 * 
	 * @return 	False if the z-coordinate is not zero.
	 * 			| if(orientation.getZ() != 0)
	 * 			|	then (result == false)
	 */
	@Override
	public boolean isValidOrientation(Orientation orientation) {
		if (!super.isValidOrientation(orientation))
			return false;
		if(orientation.getZ() != 0)
			return false;
		return true;
	}

}
